-- GENERATED SPELL FOR [Ymirheim Defender] --


function spell0_31746(pUnit, Event) --@Poisoned Spear,n/a--
pUnit:FullCastSpellOnTarget(60988,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31746', 16500, 1)
end

function spell1_31746(pUnit, Event) --@Throw Harpoon,n/a--
pUnit:FullCastSpellOnTarget(59633,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31746', 1500, 1)
end

function Sorts_31746(pUnit, Event)
local choix_sorts_31746 = math.random(0, 1)
if choix_sorts_31746 == 0 then
pUnit:RegisterEvent('spell0_31746', 1, 1)
end
if choix_sorts_31746 == 1 then
pUnit:RegisterEvent('spell1_31746', 1, 1)
end
end

function mob31746_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31746', math.random(1500, 3000), 1)
end

function mob31746_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31746_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31746_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31746, 1, 'mob31746_Action')
RegisterUnitEvent(31746, 2, 'mob31746_Leave')
RegisterUnitEvent(31746, 3, 'mob31746_Kill')
RegisterUnitEvent(31746, 4, 'mob31746_Die')
